<template>
    <div class="number-limit-container">
      <div class="car-list">
        <div>
          <div  v-for="(item, index) in [1,2,3]" :key="index" class="limit-item mB20" @click="detailTap(index, item.id)">
            <div class="v1 flex align jB mB30">
              <div class="w80">
                <span class="f24 c6">开始日期：<span class="c5">{{ item.startDate }}</span></span>
                <span class="f24 c6 mL20">结束日期：<span>{{ item.endDate }}</span></span>
              </div>
              <div class="f24">
                <span class="c5277E0" v-if="item.state == 1">未开始</span>
                <span class="c1CBA58" v-if="item.state == 2">进行中</span>
                <span class="cFF8832" v-if="item.state == 3">已过期</span>
              </div>
            </div>
            <div class="limit-body">
              <div class="limit-body-top">
                <span>一</span>
                <span>二</span>
                <span>三</span>
                <span>四</span>
                <span>五</span>
                <span>六</span>
                <span>日</span>
              </div>
              <div class="limit-body-bottom">
                <span>{{ item.one }}</span>
                <span>{{ item.two }}</span>
                <span>{{ item.three }}</span>
                <span>{{ item.four }}</span>
                <span>{{ item.five }}</span>
                <span>{{ item.six }}</span>
                <span>{{ item.seven }}</span>
              </div>
            </div>
          </div>
        </div>
        <div class="bottom-tip">加载中...</div>
        <div class="bottom-tip">暂无数据</div>
        <div class="bottom-tip">到底了~</div>
      </div>
      <img src="../../assets/images/car/guize.png" class="add-icon" @click="addTap" v-if="includes(roles, '121')" />
      <img src="../../assets/images/fastTop.png" class="goTop" :hidden="showTop" @click="goTop" />
    </div>
  </template>
  
  <script>
  export default {
    data() {
      return {
        list: [],
        isLoading: false,
        total: 0,
        roles: [],
        showTop: false
      };
    },
    methods: {
      detailTap(index, id) {
        // 处理点击事件
      },
      addTap() {
        // 处理添加事件
      },
      goTop() {
        // 处理回到顶部事件
      },
      includes(roles, role) {
        return roles.indexOf(role) !== -1;
      }
    }
  };
  </script>
  
  <style scoped>
  .number-limit-container {
    background: #f5f5f5;
    padding: 20px;
    min-height: 100%;
    font-size: 14px;
    text-align: left;
  }
  
  .goTop {
    position: fixed;
    bottom: 4%;
    right: 5%;
    width: 46px;
    height: 46px;
    z-index: 100;
  }
  
  .add-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: fixed;
    right: 5%;
    bottom: 12%;
    text-align: center;
    display: flex;
    color: #fff;
    align-items: center;
    justify-content: center;
  }
  
  .add-icon img {
    width: 32px;
    height: 32px;
  }
  
  .cFF8832 {
    color: #FF8832;
  }
  
  .c5277E0 {
    color: #5277E0;
  }
  
  .c1CBA58 {
    color: #1CBA58;
  }
  
  .limit-item {
    padding: 30px 20px;
    background: #fff;
  }
  
  .limit-item .w80 {
    width: 85%;
  }
  
  .limit-item .w20 {
    width: 20%;
  }
  
  .limit-body {
    border: 1px solid #93B4D5;
  }
  
  .limit-body-top {
    border-bottom: 1px solid #93B4D5;
  }
  
  .limit-body-top span,
  .limit-body-bottom span {
    display: inline-block;
    width: 14%;
    font-size: 16px;
    line-height: 60px;
    height: 60px;
    text-align: center;
    border-right: 1px solid #93B4D5;
  }
  
  .limit-body-bottom span {
    color: #379AFD;
  }
  
  .limit-body-top span:nth-last-child(1),
  .limit-body-bottom span:nth-last-child(1) {
    border: 0;
  }
  </style>